package com.mushuilingfeng.ddd.user.domain.org.repository;

import com.mushuilingfeng.ddd.user.domain.org.entity.Department;
import com.mushuilingfeng.ddd.framework.repository.IDomainRepository;

/**
 * @author
 * @date 2024/9/18
 */
public interface IDepartmentRepository extends IDomainRepository<Department> {

    Department getByDeptCode(String deptCode);

    /**
     * 增减部门人数
     *
     * @param deptCode 部门编码
     * @param count    增减数量，正数表示增加，负数表示减少
     */
    void incrementEmployeeCount(String deptCode, int count);

    boolean existChildDept(String deptCode);
}
